package cn.kgc.kgde.bookstore.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class OrderDTO {
    /**
     * Order
     */
    @TableId(value = "orderId", type = IdType.AUTO)
    private String orderId;

    private String userCode;

    private String reciever;

    private String recieverAddress;

    private String recieverPhone;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private Double totalCost;

    @ApiModelProperty("1.未发货 2.已发货 3.订单完成")
    private Integer state;

    /**
     * OrderDetail
     */
    @ApiModelProperty("id")
    private Long detailId;

    @ApiModelProperty("图书id")
    private Long bookId;

    @ApiModelProperty("图书名称")
    private String bookName;

    @ApiModelProperty("价格")
    private Double bookPrice;

    @ApiModelProperty("数量")
    private Integer quantity;

    @ApiModelProperty("小计")
    private Double cost;
}
